/*
 * Copyright © 2021-2023 Innospots (http://www.innospots.com)
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License. You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

@import '~antd/es/style/themes/index.less';
@import '~antd/es/input/style/mixin.less';

.selector {
  position: relative;
  display: flex;
  justify-content: space-between;
  height: @height-base;
  border: 1px solid @border-color-base;
  border-radius: @border-radius-base;
  transition: border 0.3s;

  * {
    cursor: pointer;
  }

  &.focused {
    .active();
  }

  &:hover {
    .hover();
  }

  &.selected {
    padding-left: 26px;
  }

  .selectedIcon {
    position: absolute;
    top: 8px;
    left: 4px;
    width: 30px;
    text-align: center;

    .icon {
      font-size: 20px;
    }
  }

  .arrow {
    position: absolute;
    top: 50%;
    right: 11px;
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    color: rgba(0, 0, 0, 0.25);
    font-size: 12px;
    font-style: normal;
    line-height: 1;
    text-align: center;
    text-transform: none;
    vertical-align: -0.125em;
    pointer-events: none;
    text-rendering: optimizelegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

.iconList {
  display: flex;
  flex-wrap: wrap;
  width: 420px;
  height: 260px;
  overflow-y: auto;

  .iconItem {
    width: 68px;
    height: 68px;
    margin: 6px;
    border: 1px solid @border-color-split;
    border-radius: @border-radius-base;
    cursor: pointer;

    .inner {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      color: @text-color-secondary;

      .icon {
        font-size: 24px;
      }

      .label {
        display: inline-block;
        height: 26px;
        padding: 0 4px;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.1;
        text-align: center;
        word-break: break-all;
      }
    }

    &.active,
    &:hover {
      border-color: @primary-color;
    }
  }
}
